feat: migrate yarn classic to pnpm HCRC-195#263
Conversation
Refs: HCRC-195
Refs: HCRC-195
Refs: HCRC-195
Refs: HCRC-195
Refs: HCRC-195
Refs: HCRC-195
Refs: HCRC-195
Refs: HCRC-195
There was a problem hiding this comment.
Pull request overview
Migrates the repository’s tooling from Yarn Classic to pnpm, including Node version alignment, CI workflow updates, and documentation/script adjustments to support the new package manager across local dev and release flows.
Changes:
- Switch package manager to pnpm (scripts, lockfile usage, workspace-level overrides) and update Node baseline to 24 in CI and local tooling.
- Update Docker build to use a pnpm-capable base image and pnpm install flow.
- Refresh developer documentation and small lint/type-system adjustments to accommodate tooling changes.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/core/pageModules/CardsModule/Icon.tsx | Adds an eslint disable directive for a new lint rule affecting the lazy icon component. |
| src/core/configProvider/defaultConfig.tsx | Adjusts TS typing pattern for defaultConfig to use satisfies Config without as const. |
| README.md | Updates install/dev commands and release documentation for pnpm; adjusts section headings/TOC. |
| public/mockServiceWorker.js | Bumps MSW worker PACKAGE_VERSION. |
| pnpm-workspace.yaml | Introduces pnpm configuration (overrides, supply-chain hardening, build allowlist). |
| package.json | Declares pnpm as package manager, updates entry points to dist/, updates scripts and deps for pnpm/Node 24 tooling. |
| eslint.config.mjs | Switches TS parser reference to typescript-eslint’s exported parser. |
| Dockerfile | Moves from Yarn-based install to pnpm-based install using a pnpm builder base image. |
| .nvmrc | Updates local Node version to v24.0.0. |
| .husky/pre-commit | Switches pre-commit commands from yarn to pnpm exec. |
| .github/workflows/release-please.yml | Updates reusable workflows to pnpm-based CI and Node 24. |
| .github/workflows/CI.yml | Updates reusable workflow to pnpm-based CI and Node 24 with SONAR token wiring. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR migrates the repo from Yarn/Node 22 to pnpm/Node 24: manifest and workspace updates, CI and release workflows switched to pnpm reusable workflows, Docker and dev hooks moved to pnpm, README updated, and small ESLint/type/code tweaks applied. ChangesNode.js 24 and pnpm Migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/CI.yml:
- Line 12: Replace mutable reusable-workflow refs that use `@main` with immutable
commit SHAs: update the reference string
"City-of-Helsinki/.github/.github/workflows/ci-pnpm-node.yml@main" in CI.yml to
the specific commit SHA for that workflow, and do the same for the other
workflows that reference ci-pnpm-node.yml@main and ci-npm-publish.yml@main
(e.g., in release-please.yml); ensure each "uses:" entry points to the exact
commit SHA rather than the branch name so the CI runs a fixed, auditable
workflow version.
In @.github/workflows/release-please.yml:
- Line 30: The workflow uses for reusable workflows are pinned to the mutable
ref `@main` which is non-reproducible; replace each uses entry referencing
City-of-Helsinki/.github/.github/workflows/ci-pnpm-node.yml@main and
City-of-Helsinki/.github/.github/workflows/ci-npm-publish.yml@main with an
immutable commit SHA (e.g., @<commit-sha>) so runs are reproducible and
supply-chain safe—update both occurrences in release-please.yml (the two
ci-pnpm-node.yml and ci-npm-publish.yml entries) and the ci-pnpm-node.yml
reference in CI.yml to the chosen commit SHAs and commit the updated workflow
files.
In `@Dockerfile`:
- Line 2: The Dockerfile uses a mutable image tag for the builder stage ("FROM
helsinki.azurecr.io/ubi9/nodejs-24-pnpm-builder-base AS appbase"); replace this
with an immutable digest-pinned reference for reproducible builds by resolving
the current image's sha256 digest (e.g., pull the image and obtain its
RepoDigest) and update the FROM line to use the registry@sha256:<digest> form
while keeping the AS appbase stage name unchanged.
In `@README.md`:
- Line 421: Replace the broken sentence "Some of the built packages created with
`pnpm build` does some issues with some types." in the README with a
grammatically correct version; for example: "Some packages built with `pnpm
build` can have issues with exported types, which may cause consuming
applications to be unable to read certain exports (especially enums)..." —
update the text around the `pnpm build` bullet to use this clearer wording and
keep the existing link to the Rollup issue.
- Around line 414-416: Remove the stray Apollo guidance sentence that was
accidentally appended to the Windows publishing note in README.md: delete the
clause starting "An Apollo client linked to a graphql endpoint with a supported
schema (headless CMS) must be provided in the `apolloClient` field of the
`config` object." so the publishing note about Windows and Docker stands alone;
also scan nearby lines in README.md for any other leftover Apollo-client text
and remove or move it to the correct section if intended.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 07f6c06b-ff68-4216-899f-15a26781b1ab
⛔ Files ignored due to path filters (2)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (12)
.github/workflows/CI.yml.github/workflows/release-please.yml.husky/pre-commit.nvmrcDockerfileREADME.mdeslint.config.mjspackage.jsonpnpm-workspace.yamlpublic/mockServiceWorker.jssrc/core/configProvider/defaultConfig.tsxsrc/core/pageModules/CardsModule/Icon.tsx
Refs: HCRC-195
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
README.md (2)
401-401: 💤 Low valueCapitalize "React" as a proper noun.
The phrase "react context" should be "React context" since React is a proper noun (the library name).
✨ Suggested fix
-- Jest has difficulties loading this library. When this library is required in a test file, it's possible that some imports are cjs and some are esm. These two variants do not share a react context which can result in `useConfig` calls that return an empty config object even though `<ConfigProvider>` is declared correctly. I.e. `<ConfigProvider>` sets values for `context1` and `useConfig` reads `context2`. +- Jest has difficulties loading this library. When this library is required in a test file, it's possible that some imports are cjs and some are esm. These two variants do not share a React context which can result in `useConfig` calls that return an empty config object even though `<ConfigProvider>` is declared correctly. I.e. `<ConfigProvider>` sets values for `context1` and `useConfig` reads `context2`.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` at line 401, Update the README text so the library name is capitalized: change the phrase "react context" to "React context" in the sentence that describes mismatched CJS/ESM contexts (the line referencing `<ConfigProvider>` and `useConfig`) to correctly treat React as a proper noun; ensure any other occurrences of "react" in this paragraph are also capitalized to "React".
397-397: 💤 Low valuePolish the Windows publishing note grammar.
Minor phrasing issue: "using Windows environment" should be "in a Windows environment" or "on Windows".
✨ Suggested polish
-**Note:** There is a known issue with publishing using Windows environment. If you are using Windows, use a Docker container to publish the package. +**Note:** There is a known issue with publishing in a Windows environment. If you are using Windows, use a Docker container to publish the package.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` at line 397, The sentence "There is a known issue with publishing using Windows environment." is grammatically awkward; update the README sentence to use correct preposition and polish phrasing (e.g., "There is a known issue with publishing in a Windows environment" or "There is a known issue with publishing on Windows") and keep the recommendation ("If you are using Windows, use a Docker container to publish the package.") consistent and concise so the two lines read smoothly together.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 29: The table of contents contains an orphaned entry "Automated package
smoke test" that has no matching section in the document; either remove that TOC
line or add a corresponding section header "## Automated package smoke test"
with the content for the test steps. Update the README.md TOC to delete the "-
[Automated package smoke test](`#automated-package-smoke-test`)" entry if you
don't intend to add the section, or create the section body (heading and
descriptive content) so the link resolves correctly.
---
Nitpick comments:
In `@README.md`:
- Line 401: Update the README text so the library name is capitalized: change
the phrase "react context" to "React context" in the sentence that describes
mismatched CJS/ESM contexts (the line referencing `<ConfigProvider>` and
`useConfig`) to correctly treat React as a proper noun; ensure any other
occurrences of "react" in this paragraph are also capitalized to "React".
- Line 397: The sentence "There is a known issue with publishing using Windows
environment." is grammatically awkward; update the README sentence to use
correct preposition and polish phrasing (e.g., "There is a known issue with
publishing in a Windows environment" or "There is a known issue with publishing
on Windows") and keep the recommendation ("If you are using Windows, use a
Docker container to publish the package.") consistent and concise so the two
lines read smoothly together.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Refs: HCRC-195
|



Refs: HCRC-195
Description
HCRC-195:
Summary by CodeRabbit
Chores
Documentation
Style